package com.boot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.boot.dao.UserDAO;
import com.boot.entity.User;

@Service
public class UserSerivceImpl implements UserService {

	@Autowired
	private UserDAO userDAO;
	
	public User getUser(String userName) {
		
		return userDAO.findByUserName(userName);
	}

	public List<User> getUsers() {
		
		return userDAO.findAll();
	}

}
